<?php

class Autor_to {
	
	private $login;
	private $password;
	private $email;
	
	public function __construct($login, $password, $email) {
		$this->login = $login;
		$this->password = $password;
		$this->email = $email;
	}
	
	public function get_login() {
		return $this->login;
	}
	
	public function get_password() {
		return $this->password;
	}
	
	public function set_password($password) {
		$this->password = $password;
	}
	
	public function get_email() {
		return $this->email;
	}
	
	public function set_email($email) {
		$this->email = $email;
	}
	
	
	public function equals($object) {
		if ((get_class($this) != get_class($object)) ||
				($object == null))				
			 return false;
		else {
			if (($this->login == $object->get_login()) &&
				($this->password = $object->get_password()) &&
				($this->email = $object->get_email()))
				return true;
			return false;
		}
	}
	
	public function to_string() {
		return 'login: ' . $this->login . ' | ' . 
				'password: ' . $this->password . ' | ' .
				'email: ' . $this->email;				
	}
}

?>